const Router = require('koa-router')

const { login, register } = require('../controller/user.controller')
const { userValidator } = require('../middleware.js/user.middleware')

const router = new Router({ prefix: '/user' })

// 用户注册
router.post('/register',userValidator, register)

// 登录接口
router.post('/login', login)

module.exports = router